$(document).ready(function () {
	var page = 1;
	$("#news-action .view-more a.more").click(function () {
		page ++;
		$("#ajax-getmore-loading").show();
		var form_data = {page: page};
		$.ajax({
			type: "GET",
			url: "/ajax-list-news",
			data: form_data,
			dataType: "html",
			success: function(response)
			{
				$("#ajax-getmore-loading").hide();
				$("#main-content .list-news").append(response);
				$("a.timeago").timeago();
			}
		});
		return false;
	});
	
	$("a.timeago").timeago();
	
	$("ul#page-nav li:eq(0) a").addClass("active");
});